import sys

from setuptools import setup, find_packages

install_requires = [
    'BrowserTestsModels',
    'WebOb',
    'Paste',
    # simplejson fails to install on Windows using pip.
    # The bootstrapping script will install it manually using
    # easy_install.
    #'simplejson',
    # Python Imaging Library should be installed from the .exe
    # on Windows.
    #'PIL',
    # ... same story for Python Win32.
    #'python-win32',
]

if sys.platform == "darwin":
    install_requires.append('appscript')

setup(
    name="BrowserTests",
    version="0.1",
    packages=find_packages(),
    zip_safe=False,
    entry_points={
        'console_scripts': [
            # Vista wants to run the script with elevated privileges if the
            # name contains "update".
            'browsers_updtr = browsertests.utils.cli_wrapper:browsers_updtr',
            'tests_updtr = browsertests.utils.cli_wrapper:tests_updtr',
            'testrunner = browsertests.utils.cli_wrapper:testrunner',
            'testimporter = browsertests.utils.cli_wrapper:testimporter',
            'check_regress = browsertests.utils.cli_wrapper:check_regress',
            'bt_maintenance = browsertests.utils.cli_wrapper:bt_maintenance',
            # Temporary tool.
            'blacklister = browsertests.utils.cli_wrapper:blacklister',
        ]
    },
    namespace_packages=['browsertests'],
    install_requires = install_requires,
    package_data={
        'testrunner': ['browsertests/runner/xhhttpd/*.ini',
                       'browsertests/runner/xrhttpd/chrome/chrome.manifest',
                       'browsertests/runner/xrhttpd/chrome/content/*.js',
                       'browsertests/runner/xrhttpd/chrome/content/*.xul',
                       'browsertests/runner/xrhttpd/defaults/preferences/*.js',
                       'browsertests/runner/framerunner/*.html',
                       'browsertests/runner/framerunner/*.csss',
                       'browsertests/runner/framerunner/*.js',
                       'browsertests/runner/framerunner/MochiKit/*.js',
                       ],
    },
    author="Sylvain Pasche",
    author_email="sylvain.pasche@gmail.com",
    license="BSD",
    keywords="browser testing",
    url="http://www.browsertests.org/",
)
